package com.idc.resource.model;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 创建子用户
 * Created by Lijing on 2017/7/13.
 */
@Getter
@Setter
@ToString
public class UserChildReqDto implements Serializable{
    /** 手机号码 */
    @NotBlank(message = "绑定手机号码不能为空")
    @Pattern(regexp = "(\\d{11})",message = "手机号码格式有误")
    private String phone;
    /** 用户名 */
    @NotBlank(message = "用户名不能为空")
    private String userId;
    /** 用户类型 */
    @NotBlank(message = "用户类型不能为空")
    @Pattern(regexp = "(BUYER)|(SUPPLIER)|(BOTH)",message = "不支持的用户类型")
    private String userType;
    /** 登录密码 */
    @NotBlank(message = "登录密码不能为空")
    private String loginPwd;
    private String token;
}
